{  Statement: http://acmp.ru/?main=task&id_task=440
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    i,j,x,y,ans:longint;
    a:array[1..5] of boolean;

function check(i:longint):boolean;
begin
result := false;
if a[i] then exit;
result := ((i - 1) * 25 - x) * ((i - 1) * 25 - x) + y * y <= 100;
a[i] := result;
end;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
fillchar(a,sizeof(a),0);
ans := 0;
for i := 1 to 5 do begin
    read(x, y);
    for j := 1 to 5 do
        if check(j) then inc(ans);
end;
write(ans);
end.